<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>1.3.1. Items &mdash; Pyslet 0.4.20140526 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.4.20140526',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Pyslet 0.4.20140526 documentation" href="../index.html" />
    <link rel="up" title="1.3. IMS Question and Test Interoperability (version 2.1)" href="../imsqtiv2p1.html" />
    <link rel="next" title="1.3.2. Tests" href="tests.html" />
    <link rel="prev" title="1.3. IMS Question and Test Interoperability (version 2.1)" href="../imsqtiv2p1.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tests.html" title="1.3.2. Tests"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../imsqtiv2p1.html" title="1.3. IMS Question and Test Interoperability (version 2.1)"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Pyslet 0.4.20140526 documentation</a> &raquo;</li>
          <li><a href="../ims.html" >1. IMS Global Learning Consortium Specifications</a> &raquo;</li>
          <li><a href="../imsqtiv2p1.html" accesskey="U">1.3. IMS Question and Test Interoperability (version 2.1)</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-pyslet.qtiv2.items">
<span id="items"></span><h1>1.3.1. Items<a class="headerlink" href="#module-pyslet.qtiv2.items" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="pyslet.qtiv2.items.AssessmentItem">
<em class="property">class </em><tt class="descclassname">pyslet.qtiv2.items.</tt><tt class="descname">AssessmentItem</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#pyslet.qtiv2.items.AssessmentItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="core.html#pyslet.qtiv2.core.QTIElement" title="pyslet.qtiv2.core.QTIElement"><tt class="xref py py-class docutils literal"><span class="pre">pyslet.qtiv2.core.QTIElement</span></tt></a>, <tt class="xref py py-class docutils literal"><span class="pre">pyslet.qtiv2.core.DeclarationContainer</span></tt></p>
<p>An assessment item encompasses the information that is presented to a
candidate and information about how to score the item:</p>
<div class="highlight-python"><div class="highlight"><pre>&lt;xsd:attributeGroup name=&quot;assessmentItem.AttrGroup&quot;&gt;
        &lt;xsd:attribute name=&quot;identifier&quot; type=&quot;string.Type&quot; use=&quot;required&quot;/&gt;
        &lt;xsd:attribute name=&quot;title&quot; type=&quot;string.Type&quot; use=&quot;required&quot;/&gt;
        &lt;xsd:attribute name=&quot;label&quot; type=&quot;string256.Type&quot; use=&quot;optional&quot;/&gt;
        &lt;xsd:attribute ref=&quot;xml:lang&quot;/&gt;
        &lt;xsd:attribute name=&quot;adaptive&quot; type=&quot;boolean.Type&quot; use=&quot;required&quot;/&gt;
        &lt;xsd:attribute name=&quot;timeDependent&quot; type=&quot;boolean.Type&quot; use=&quot;required&quot;/&gt;
        &lt;xsd:attribute name=&quot;toolName&quot; type=&quot;string256.Type&quot; use=&quot;optional&quot;/&gt;
        &lt;xsd:attribute name=&quot;toolVersion&quot; type=&quot;string256.Type&quot; use=&quot;optional&quot;/&gt;
&lt;/xsd:attributeGroup&gt;

&lt;xsd:group name=&quot;assessmentItem.ContentGroup&quot;&gt;
        &lt;xsd:sequence&gt;
                &lt;xsd:element ref=&quot;responseDeclaration&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
                &lt;xsd:element ref=&quot;outcomeDeclaration&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
                &lt;xsd:element ref=&quot;templateDeclaration&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
                &lt;xsd:element ref=&quot;templateProcessing&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
                &lt;xsd:element ref=&quot;stylesheet&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
                &lt;xsd:element ref=&quot;itemBody&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
                &lt;xsd:element ref=&quot;responseProcessing&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;/&gt;
                &lt;xsd:element ref=&quot;modalFeedback&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
        &lt;/xsd:sequence&gt;
&lt;/xsd:group&gt;
</pre></div>
</div>
<dl class="method">
<dt id="pyslet.qtiv2.items.AssessmentItem.SortDeclarations">
<tt class="descname">SortDeclarations</tt><big>(</big><big>)</big><a class="headerlink" href="#pyslet.qtiv2.items.AssessmentItem.SortDeclarations" title="Permalink to this definition">¶</a></dt>
<dd><p>Sort each of the variable declaration lists so that they are in
identifier order.  This is not essential but it does help ensure that
output is predictable. This method is called automatically when reading
items from XML files.</p>
</dd></dl>

<dl class="method">
<dt id="pyslet.qtiv2.items.AssessmentItem.RenderHTML">
<tt class="descname">RenderHTML</tt><big>(</big><em>itemState</em>, <em>htmlParent=None</em><big>)</big><a class="headerlink" href="#pyslet.qtiv2.items.AssessmentItem.RenderHTML" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders this item in html, adding nodes to <em>htmlParent</em>.  The state
of the item (e.g., the values of any controls and template variables),
is taken from <em>itemState</em>, a <tt class="xref py py-class docutils literal"><span class="pre">variables.ItemSessionState</span></tt>
instance.</p>
<p>The result is the top-level div containing the item added to the
htmlParent. If htmlParent is None then a parentless div is created. If
the item has no itemBody then an empty Div is returned.</p>
</dd></dl>

<dl class="method">
<dt id="pyslet.qtiv2.items.AssessmentItem.AddToContentPackage">
<tt class="descname">AddToContentPackage</tt><big>(</big><em>cp</em>, <em>lom</em>, <em>dName=None</em><big>)</big><a class="headerlink" href="#pyslet.qtiv2.items.AssessmentItem.AddToContentPackage" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a resource and associated files to the content package.</p>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="../imsqtiv2p1.html"
                        title="previous chapter">1.3. IMS Question and Test Interoperability (version 2.1)</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="tests.html"
                        title="next chapter">1.3.2. Tests</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/qtiv2/items.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tests.html" title="1.3.2. Tests"
             >next</a> |</li>
        <li class="right" >
          <a href="../imsqtiv2p1.html" title="1.3. IMS Question and Test Interoperability (version 2.1)"
             >previous</a> |</li>
        <li><a href="../index.html">Pyslet 0.4.20140526 documentation</a> &raquo;</li>
          <li><a href="../ims.html" >1. IMS Global Learning Consortium Specifications</a> &raquo;</li>
          <li><a href="../imsqtiv2p1.html" >1.3. IMS Question and Test Interoperability (version 2.1)</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright ©2008-2014, Steve Lay.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
    </div>
  </body>
</html>